use WWW::Mechanize;
use HTTP::Cookies;

my $mech = WWW::Mechanize->new();

my $cookie_jar = HTTP::Cookies->new(
        file => "D:\\freaksharecom.dat",
        autosave => 1,
    );
		
$mech->cookie_jar($cookie_jar);

$mech->get("http://freakshare.net/index.php");

if($mech->content =~ /fb_username/)
{
	$mech->form_number(1);
	$mech->field("fb_username" => "MrMirror");
	$mech->field("fb_password" => "egglistcool");
	$mech->click("submit");
	
	$mech->get("http://freakshare.net/index.php");
}

$mech->form_number(1);
$mech->field("upload_type" => "2");
$mech->field("user_id" => $mech->value("user_id",1));
$mech->field("fb_nickname" => $mech->value("fb_nickname",1));
$mech->field("fb_passwort" => $mech->value("fb_passwort",1));
$mech->field("server" => $mech->value("server",1));
$mech->field("anz_files" => "1");
$mech->field("url_1" => "http://interstellardata.com/files/speedtest.zip");
$mech->click("submit");
